<div class="workplace">  
	
	<?php echo $template['partials']['loading_ajax']; ?>
    <?php echo $template['partials']['note'];?>

    <div class="row-fluid">
    	
        <div class="span12">                    
            <div class="head clearfix">
                <div class="isw-grid"></div>
                <h1>List Persons</h1>
            </div>
            <div class="block-fluid tabs">
                    <ul>
                        <li><a href="#tabs-1"><strong>All perons</strong></a></li>
                        <li><a href="#tabs-2"><strong>Person has report</strong></a></li>
                    </ul>      
                    <div id="tabs-1">
                        <div class="row-fluid">
                            <div class="span12">
                                 <div class="block-fluid table-sorting clearfix">
                                    <table cellpadding="0" cellspacing="0" width="100%" class="table tSortable">
                                        <thead>
                                            <tr>
                                                <th><input type="checkbox" name="checkall"/></th>
                                                <th width="5%">ID</th>
                                                <th width="25%">Name</th>
                                                <th width="25%">Country</th>
                                                <th width="25%">State</th>
                                                <th width="8%">Status</th>
                                                <th width="15%">Action</th>                                      
                                            </tr>
                                        </thead>
                                        <tbody>

                                            <?php if(count($persons)) : ?>
                                            <?php foreach($persons as $item) : ?>
                                                <tr id="per_<?=$item['id']?>">
                                                    <td><input type="checkbox" name="checkbox" value="<?=$item['id']?>"/></td> 
                                                    <td><?=$item['id']?></td>                        
                                                    <td><?=$item['name']?></td>
                                                    <td><?=$this->person_model->get_name_country($item['country'])?></td> 
                                                    <td><?=$this->person_model->get_name_state($item['state'])?></td>        
                                                    <td>
                                                        <?php if($item['public'] == 1) : ?>              
                                                        <span class="label label-success">Public</span>
                                                        <?php else :?>
                                                        <span class="label label-success">Private</span>
                                                        <?php endif ?>
                                                    </td>
                                                    <td>
                                                        <a href="javascript:void(0)" onclick="confirm_del('<?=URL_ADMIN?>person/delete/<?=$item['id']?>', 'per_<?=$item['id']?>')" class="icon-trash tip" title="Delete this item"></a>
                                                        <a href="<?=URL_ADMIN?>person/photo/<?=$item['id']?>" class="icon-picture tip" title="View photo of this person"></a>
                                                        <a href="<?=URL_ADMIN?>person/video/<?=$item['id']?>" class="icon-film tip" title="View list videos"></a>
                                                    </td>
                                                </tr>
                                            <?php endforeach ?> 
                                            <?php endif ?>         
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div><!--End tab1 -->
                    <div id="tabs-2">
                        <div class="row-fluid">
                            <div class="span12">
                                 <div class="block-fluid table-sorting clearfix">
                                    <table cellpadding="0" cellspacing="0" width="100%" class="table tSortable">
                                        <thead>
                                            <tr>
                                                <th width="2%"><input type="checkbox" name="checkall"/></th>
                                                <th width="5%">ID</th>
                                                <th width="30%">Name</th>
                                                <th width="25%">What is issue</th>
                                                <th width="15%">Action</th>                                      
                                            </tr>
                                        </thead>
                                        <tbody>

                                            <?php if(count($personBad)) : ?>
                                            <?php foreach($personBad as $item) : ?>
                                                <tr id="per_<?=$item['id']?>">
                                                    <td><input type="checkbox" name="checkbox" value="<?=$item['id']?>"/></td> 
                                                    <td><?=$item['id']?></td>                        
                                                    <td><a  class="tip" title="View detail this person" target="_blank" href="<?=base_url()?>person/<?=$item['id']?>-<?=$this->util->alias($item['name'])?>"><?=$item['name']?></a></td>
                                                    <td>
                                                        <?php if($item['bad'] == 1) echo "Spam"; ?>
                                                        <?php if($item['bad'] == 2) echo "Violent content"; ?>
                                                        <?php if($item['bad'] == 3) echo "Obscene content"; ?>
                                                        <?php if($item['bad'] == 4) echo "Abusive content"; ?>

                                                    </td> 
                                                    <td>
                                                        <a href="javascript:void(0)" onclick="confirm_del('<?=URL_ADMIN?>person/delete/<?=$item['id']?>', 'per_<?=$item['id']?>')" class="icon-trash tip" title="Delete this item"></a>
                                                        
                                                    </td>
                                                </tr>
                                            <?php endforeach ?> 
                                            <?php endif ?>         
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div><!--End tab1 -->                    
            </div>                                
    </div>
    <div class="dr"><span></span></div>

</div>

<!--<script type="text/javascript">
$(document).ready(function() {
    var oTable = $('#tbl_person').dataTable( {
    	"sPaginationType": "full_numbers",
    } );
} );
</script>-->
 